package com.doit.zhaohang.handlerlunbotu;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;

import java.util.ArrayList;
import java.util.List;

public class MainActivity extends AppCompatActivity {

    private ADbar mDbar;
    private int[] arr = {R.mipmap.a,R.mipmap.b,R.mipmap.c,R.mipmap.d,R.mipmap.e};
    private String[] brr = {"这是第1111张图","这是第2222张图","这是第3333张图","这是第4444张图","这是第5555张图",};
    private List<Integer> mList = new ArrayList<>();
    private List<String> mStrings = new ArrayList<>();
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        mDbar = (ADbar) findViewById(R.id.adbar);
        for (int i = 0; i < arr.length; i++) {
            mList.add(arr[i]);
            mStrings.add(brr[i]);

        }

        mDbar.setData(mList,mStrings);
    }
}
